<template>
  <div class="header">
    <div class="header_content" :style="{height:persistence.type?'40px':'100%'}">
      <Toolbar/>
      <User/>
    </div>
    <Tags v-if="persistence.type"/>
  </div>
</template>

<script>
  import {mapState} from 'vuex';
  import Tags from './Tags';
  import Toolbar from './Toolbar';
  import User from './User';

  export default {
    name: "Header",
    computed: {
      ...mapState(['persistence'])
    },
    components: {
      Tags,
      Toolbar,
      User,
    },
  }
</script>

<style scoped>
  .header {
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px #E4E7ED;
    height: 100%;
  }

  .header_content {
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
</style>
